<template>
  <div>
    <!--1.容器 -->
    <div id="map_china" style="height: 500px"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {

    };
  },
  methods: {
    initMap() {
      //加载geo数据
      let mapData = Highcharts.maps['cn/china'];
      //配置
      var map = Highcharts.mapChart('map_china', {
        title: {
          text: "中国实时疫情监控",
        },
        series: [
          {
            mapData,
            data: [{
                name: "上海",
                value: "3"
              },{
                name: "北京",
                value: "10"
              }],
            joinBy: "name"
          }]
      });
    }
  },
  mounted() {
    //初始化地图
    this.initMap();
  },
};
</script>